package org.iks.store.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.iks.common.aop.handler.ChatMessageTypeTypeHandler;
import org.iks.common.enums.ChatMessageType;

import java.util.Date;

/**
 * Author kzou
 * Date 2024/2/14
 * Description: 会话聊天消息
 */

@Data
@TableName("session_message")
public class SessionMessageEntity {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 发送者账号
     */
    private String senderAccount;

    /**
     * 文本消息
     */
    private String message;

    /**
     * 消息类型
     */
    @TableField(typeHandler = ChatMessageTypeTypeHandler.class)
    private ChatMessageType messageType;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 会话ID
     */
    private Integer sessionId;

    /**
     * 会话密钥版本
     */
    private Integer secretVersion;

}
